package com.net.dao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * Created by zhang yufei on 2017/11/24.
 */
@Repository
public class BaseDao {

    @Autowired
    public JdbcTemplate jdbcTemplate;

    public List<Map<String,Object>> select(String sql){
        List<Map<String,Object>> list=jdbcTemplate.queryForList(sql);
        return list;
    }
}
